package cn.iocoder.yudao.module.crossborder.platform.controller.admin.platformfeeconfig.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDate;
import java.util.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;

@Schema(description = "管理后台 - 跨境电商平台费率配置新增/修改 Request VO")
@Data
public class PlatformFeeConfigSaveReqVO {

    @Schema(description = "费率配置编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "247")
    private Long id;

    @Schema(description = "平台编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "11005")
    @NotNull(message = "平台编号不能为空")
    private Long platformId;

    @Schema(description = "店铺编号（为空表示平台级配置）", example = "29356")
    private Long storeId;

    @Schema(description = "费率类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotEmpty(message = "费率类型不能为空")
    private String feeType;

    @Schema(description = "费率名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @NotEmpty(message = "费率名称不能为空")
    private String feeName;

    @Schema(description = "英文名称")
    private String feeNameEn;

    @Schema(description = "计算方式（1百分比 2固定金额 3阶梯费率）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计算方式（1百分比 2固定金额 3阶梯费率）不能为空")
    private Integer calculationMethod;

    @Schema(description = "费率（百分比时为小数，如0.15表示15%）")
    private BigDecimal feeRate;

    @Schema(description = "固定金额")
    private BigDecimal fixedAmount;

    @Schema(description = "最小费用")
    private BigDecimal minFee;

    @Schema(description = "最大费用")
    private BigDecimal maxFee;

    @Schema(description = "货币代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "货币代码不能为空")
    private String currency;

    @Schema(description = "适用分类ID，逗号分隔")
    private String categoryIds;

    @Schema(description = "适用产品类型，逗号分隔")
    private String productTypes;

    @Schema(description = "阶梯费率配置JSON")
    private String tierConfig;

    @Schema(description = "生效日期")
    private LocalDate effectiveDate;

    @Schema(description = "失效日期")
    private LocalDate expireDate;

    @Schema(description = "状态（0正常 1停用）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "状态（0正常 1停用）不能为空")
    private Integer status;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

}